<?php
declare (strict_types = 1);

namespace app\admin\controller;

use app\BaseController;
use think\facade\Request;
use think\facade\View;
use think\facade\Db;


class cate extends BaseController
{
    //分类管理
    public function cate()
    {
        $id=Request::get("id",'','trim,htmlspecialchars,strip_tags');

        $data = [
            'id'=>$id
        ];

        $arr=[];
        $rt=\app\admin\model\Gcategory::getCateList();
        $list=\app\admin\model\Gcategory::Jie($data);
        foreach($rt as $v){
            $arr[]=$v['parent_id'];
        }
        View::assign('rt',$arr);
        return View::fetch('',['data'=>$data,'list'=>$list]);
    }
    //分类管理修改
    public function cateedit()
    {
        return View::fetch();
    }
}